<?php

namespace App\Http\Validators;

use Validator;

class Projects implements ValidatorInterface
{
    use ValidatorTraits;

    public function rules()
    {
        $rules = [
            'uid' => 'required',
            'realname' => 'required',
            'mobile' => 'required|size:11',
            'money' => 'required|min:100|numeric',
        ];

        $this->rules = $rules;
    }

    public function msgs()
    {
        $messages = [
            'uid.required' => '用户信息缺失',
            'mobile.required' => '联系方式缺失',
//            'mobile.numeric' => '联系方式全部由数字组成',
            'mobile.size' => '联系方式由11位数字组成',
            'realname.required' => '联系人姓名缺失',
            'money.required' => '请输入额度',
            'money.min' => '最小额度为100',
            'money.numeric' => '额度必须为整数',
        ];

        $this->msgs = $messages;
    }

}